import BaseService from "@/service/base";

class AfterDepartment extends BaseService {
	// 全部列表
	page(params) {
		return this.$get("/OnSale/lists", {
			params
		}).then(res => {
			return {
				list: res.data,
				pagination: {
					...params,
					total: res.total
				}
			};
		});
	}
	// 新增
	add(data) {
		return Promise.resolve();
	}
	// 更新，包含 id
	update(data) {
		return Promise.resolve();
	}
	// 详情，传行 id
	info({ id }) {
		return Promise.resolve({
			/* 用户信息 */
		});
	}
	// 删除，ids = [1, 2, 3]
	delete({ ids }) {
		return Promise.resolve();
	}
	// 日跟踪 ---------- start -------------
	dayDetail(params) {
		return this.$post("/OnSale/details", params)
	}
	// 日跟踪报表
	dayReport(params) {
		return this.$post("/OnSale/detailsReport", params)
	}
	// 日跟踪报表明细
	dayReportDet(params) {
		return this.$post('/OnSale/deptdetailed', params)
	}
	// 组员任务
	teamDetail(params) {
		return this.$post("/OnSale/teamdetails", params)
	}
	// 组员列表
	teamList(params) {
		return this.$get('/user/deptuserlists', {
			params
		})
	}
	// 新增组员目标
	addTeamGoal(params) {
		return this.$post('/OnSale/teamgoalsadd', params)
	}
	// 修改组员目标
	modifyTeamGoal(params) {
		return this.$post('/OnSale/teamgoalsedit', params)
	}
	// 删除组员目标
	delTeamGoal(params) {
		return this.$post('/OnSale/teamgoalsdelete', params)
	}
	// 日跟踪 ---------- end -------------
}
export default AfterDepartment
